﻿using System;
using Common.Builders.Interfaces;
using Common.Entities;

namespace Common.Builders
{
    public class UserAccountBuilder : IUserAccountBuilder
    {
        private string _accountName;
        private string _accountPassword;
        private SocialNetwork _socialNetwork;

        public UserAccount Build()
        {
            return new UserAccount(_accountName, _accountPassword, _socialNetwork);
        }

        public IUserAccountBuilder WithUserAccount(UserAccount userAccount)
        {
            _accountName = userAccount.AccountName;
            _accountPassword = userAccount.AccountPassword;
            return this;
        }

        public IUserAccountBuilder WithUserAccountName(string userAccountName)
        {
            _accountName = userAccountName;
            return this;
        }

        public IUserAccountBuilder WithUserAccountPassword(string userAccountPassword)
        {
            _accountPassword = userAccountPassword;
            return this;
        }

        public IUserAccountBuilder WithSocialNetwork(SocialNetwork socialNetwork)
        {
            _socialNetwork = socialNetwork;
            return this;
        }

        public object Clone()
        {
            throw new NotImplementedException();
        }
    }
}
